<template>
	<view>
		<view class="wrapper">
			<view class="icon">
				<u-icon name="rmb-circle-fill" color="#f6c544" size="150"></u-icon>
			</view>
			<view class="title"><text>￥</text> {{RebateLsit.rebate_money}}<text>元</text></view>
		</view>
		<u-cell-group>
			<u-cell-item :title="'当前状态 :  ' + staColor(RebateLsit.status).text  " :arrow="false" :border-bottom="false"></u-cell-item>
			<u-cell-item :title="'申请时间 :  ' + RebateLsit.create_time" :arrow="false" :border-bottom="false"></u-cell-item>
			<u-cell-item :title="'体现单号 :  ' + RebateLsit.trade_no" :arrow="false" :border-bottom="false"></u-cell-item>
		</u-cell-group>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				RebateLsit: []
			};
		},
		onLoad(e) {
			this.getrebateList(e.id)
		},
		methods: {
			// 返现列表
			getrebateList(e) {
				let that = this
				let postData = {
					"rebate_id": e
				};
				that.$u.post('/api/rebate/details', postData).then(res => {
					that.RebateLsit = res
				});
			},
			staColor(col) {
				switch (col) {
					case -1:
						return {
							text: '已作废',
							color: '#81ecec'
						};
					case 0:
						return {
							text: '待审核',
							color: '#fdcb6e'
						};
					case 1:
						return {
							text: '发放中',
							color: '#18B566'
						};
					case 2:
						return {
							text: '提现成功',
							color: '#ff7675'
						};
					case 3:
						return {
							text: '过期待领取',
							color: '#74b9ff'
						};
					default:
						break;
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wrapper {
		padding: 100rpx;
		width: 100%;
		background-color: #FFFFFF;
		.icon{
			display: flex;
			justify-content: center;
			align-items: center;
		}
		.title{
			font-weight: 600;
			color: #DD524D;
			font-size: 50rpx;
			text-align: center;
			text{
				margin: 0rpx 8rpx;
				font-size: 30rpx;
			}
		}
	}
</style>
